# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=khelpcenter
pkgver=20.04.3
pkgrel=0
pkgdesc="Application to show KDE Applications' documentation"
arch="all !armhf" # armhf blocked by extra-cmake-modules
url="https://userbase.kde.org/KHelpCenter"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="extra-cmake-modules qt5-qtbase-dev karchive-dev kbookmarks-dev kconfig-dev kcoreaddons-dev kdbusaddons-dev kdoctools-dev ki18n-dev kinit-dev khtml-dev kservice-dev kwindowsystem-dev grantlee-dev xapian-core-dev libxml2-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/khelpcenter-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="0859633ea0a9e8b9a304057e3261614e560d6764d60c42eb377c8cd2d1e9ef3c185feb7221276c6b160365c6041c6711891435d8ce23c1b53ef660706ead14c0  khelpcenter-20.04.3.tar.xz"
